<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>索书号检查</title>
    <meta name="decorator" content="default"/>
    <script>
        $(function(){
            $("tr").mouseover(function(){
                $(this).children().css("background-color", " #00eeee");
            }).mouseout(function(){
                $(this).children().css("background-color", " #ffffff");
            });
        });
        var oldPlace = "${classcode}";
        window.parent.place = oldPlace;
        function selectPlace(place) {
            window.parent.place = oldPlace;
            if(place != ''){
                window.parent.place = place;
            }
            window.parent.window.jBox.close();
        }
    </script>
    <style>
        .field {
            width: 80px;
            text-align: right;
        }
        tr{
            cursor: pointer;
        }
        td {
            height: 30px;
        }
    </style>
</head>
<body>
<div style="margin-top: 10px;">
    <form action="${ctx}/book/purchase/checkPlace" method="post">
        <input name="classcode" value="${classcode}" style="margin-left: 15px;">
        <button class="btn btn-small">查询</button>
    </form>
</div>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
    <tr>
        <th>索书号</th>
        <th>ISBN</th>
        <th>题名</th>
        <th>著者</th>
        <th>出版社</th>
        <th>出版日期</th>
        <th>价格</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${stores}" var="store">
        <tr ondblclick="selectPlace('${store.classcode}/${store.place}')">
            <td>${store.classcode}/${store.place}</td>
            <td>${store.isbn}</td>
            <td>${store.bookname}</td>
            <td>${store.author}</td>
            <td>${store.publisher}</td>
            <td>${store.pubdate}</td>
            <td>${store.price}</td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>